<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>新增类型·思通投研·让数据驱动投资价值!</title>

    <link href="${pageContext.request.contextPath }/img/webLogoIcon.png" rel="shortcut icon">
    <link href="${pageContext.request.contextPath }/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/font-awesome.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/custom.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/animate.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/style.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/datatables.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/toastr.min.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath }/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath }/css/jquery.searchableSelect.css" rel="stylesheet" type="text/css">
    <style>
        .select2_demo_1 {
            float: left;
            width: 120px;
            display: inline;
            margin-left: 10px;
        }

        .form-control {
            display: inline;
        }

        .col-sm-3 {
            float: right;
            width: 560px;
        }

        .input-group {
            float: right;
            width: 240px;
            margin-left: 5px;
        }

        .checkbox {
            padding-left: 35px;
            float: left;
        }
    </style>
</head>

<body>

<div id="wrapper">

    <nav class="navbar-default navbar-static-side" role="navigation">
        <%request.setAttribute("LEFT", "websitelist");%>
        <%@include file="left-factory.jsp" %>
    </nav>

    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom">
            <jsp:include page="head-factory.jsp" flush="true"/>
        </div>
        <div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-10">
                <h2>新增类型</h2>
            </div>
        </div>
        <div class="wrapper wrapper-content">
            <div class="ibox-content">
                <form action="${pageContext.request.contextPath}/spiderconfig/test" method="post" target="_blank">
                    <span style="font-size: 17px;" id="websiteId" data-id="${websiteId }">网站名称:${websitename } </span>
                    <button class="btn btn-white pull-right"
                            onclick="javascrtpt:window.location.href='${pageContext.request.contextPath }/listseed?websiteId=${websiteId}'"
                            type="button">返回
                    </button>
                    <div class="table-responsive" style="margin-top: 5%;">
                        <%-- <div class="search-result">
                            <span style="font-size: 17px;">添加一个在【${websitename }】下种子地址配置信息</span>
                            <div style="display: inline;float: right;">
                                            线程数:<select class="form-control" style="display: inline;width: auto;"
                                                id="seedthreadconfig" name="seedthreadconfig">
                                                <option value="1" selected>1条</option>
                                                <option value="5">5条</option>
                                                <option value="10">10条</option>
                                            </select>
                                            &nbsp;&nbsp;&nbsp;&nbsp;抓取间隔:<select class="form-control" style="display: inline;width: auto;"
                                                id="seedintervalconfig" name="seedintervalconfig">
                                                <option value="60000">1分钟</option>
                                                <option value="600000" selected>10分钟</option>
                                                <option value="1800000">30分钟</option>
                                                <option value="3600000">60分钟</option>
                                            </select>
                                            &nbsp;&nbsp;&nbsp;&nbsp;访问URL间隔:<select class="form-control" style="display: inline;width: auto;"
                                                id="seedsleepconfig" name="seedsleepconfig">
                                                <option value="1000">1秒</option>
                                                <option value="2000">2秒</option>
                                                <option value="3000">3秒</option>
                                                <option value="4000">4秒</option>
                                                <option value="5000" selected>5秒</option>
                                            </select>
                                        </div>
                                    </div> --%>
                        <div class="hr-line-dashed"></div>

                        <div class="panel-body">

                            <fieldset class="form-horizontal" style="margin-top: 3%;">

                                <!-- <div class="form-group"><label class="col-sm-2 control-label">选择配置方式:</label>
                                    <div class="col-sm-10"><div class="btn-group">
                            <button id="smartbutton" class="btn btn-white active" type="button" onclick="configTypeChange(1)">智能配置</button>
                            <button id="manualbutton" class="btn btn-white" type="button" onclick="configTypeChange(2)">手动配置</button>
                        </div></div>
                                </div> -->
                                <div class="form-group"><label class="col-sm-2 control-label"><span
                                        style="color:red;font-size:16px;line-height:0px;">*</span>配置站点类型:</label>
                                    <select id="se1" name="seedid" class="form-control"
                                            style="display: inline;width: auto;margin-left:15px;">
                                    </select>
                                    <div class="form-group"><label class="col-sm-2 control-label"><span
                                            style="color:red;font-size:16px;line-height:0px;">*</span>配置接口信息:</label>
                                        <div class="col-sm-10"><input type="text" id="paramexample" name="paramexample"
                                                                      class="form-control" style="width: 88%;"
                                                                      value="http://192.168.71.63:6302/commonsearch/superdatalist">
                                        </div>
                                    </div>
                                    <div class="form-group"><label class="col-sm-2 control-label">配置参数规则:</label>
                                        <div class="col-sm-10"><input type="text" id="param" name="param" value=""
                                                                      class="form-control" style="width: 88%;"></div>
                                    </div>
                                    <div class="form-group"><label class="col-sm-2 control-label"><span
                                            style="color:red;font-size:16px;line-height:0px;">*</span>配置错误接口:</label>
                                        <div class="col-sm-10"><input type="text" id="errorparamexample"
                                                                      name="paramexample" class="form-control"
                                                                      style="width: 88%;"
                                                                      value="http://192.168.71.63:6302/commonsearch/superdatalist">
                                        </div>
                                    </div>
                                    <div class="form-group"><label class="col-sm-2 control-label">配置错误规则:</label>
                                        <div class="col-sm-10"><input type="text" id="errorparam" name="param" value=""
                                                                      class="form-control" style="width: 88%;"></div>
                                    </div>

                                    <div class="form-group" id="sampleDataDiv" style="display: none"><label
                                            class="col-sm-2 control-label">测试样本数据:</label>
                                        <div class="col-sm-10"><input type="text" id="sampleData" name="param" value=""
                                                                      class="form-control" style="width: 88%;"></div>
                                    </div>
                                    <!-- <div class="form-group"><label class="col-sm-2 control-label"><span style="color:red;font-size:16px;line-height:0px;">*</span>配置存储规则:</label>
                                    	<div class="checkbox">
                                      <input id="checkbox1" name="seedtextStorageJson" type="checkbox" value="1" class="seedtextStorageJson" checked>
                                      <label for="checkbox1">MySQL</label>
                                 	 </div>
                                 	 <div class="checkbox">
                                  		<input id="checkbox2" name="seedtextStorageJson" type="checkbox" value="2" class="seedtextStorageJson">
                                      	<label for="checkbox2">MongoDB</label>
                                  	</div>
                                  	<input id="spiderId" name="spiderId" type="hidden" value="1">
                                 	 <div class="checkbox">
                                  		<input id="checkbox3" name="seedtextStorageJson" type="checkbox" value="3" class="seedtextStorageJson">
                                     	 <label for="checkbox3">ES</label>
                                 	 </div>
									</div> -->
                                    <!--  <div class="form-group configtype" style="display:none"><label class="col-sm-2 control-label"><span style="color:red;font-size:16px;line-height:0px;">*</span>配置标题规则:</label>
                                         <div class="col-sm-10"><input type="text" id="seedtitleconfig" name="seedtitleconfig" class="form-control" style="width: 88%;" placeholder="请输入标题解析代码"></div>
                                     </div>
                                     <div class="form-group configtype" style="display:none"><label class="col-sm-2 control-label">配置来源规则:</label>
                                         <div class="col-sm-10"><input type="text" id="seedoriginconfig" name="seedoriginconfig" class="form-control" style="width: 88%;" placeholder="请输入来源解析代码"></div>
                                     </div>
                                     <div class="form-group configtype" style="display:none"><label class="col-sm-2 control-label">配置来源URL规则:</label>
                                         <div class="col-sm-10"><input type="text" id="seedoriginurlconfig" name="seedoriginurlconfig" class="form-control" style="width: 88%;" placeholder="请输入来源URL解析代码"></div>
                                     </div>
                                     <div class="form-group configtype" style="display:none"><label class="col-sm-2 control-label"><span style="color:red;font-size:16px;line-height:0px;">*</span>配置日期规则:</label>
                                         <div class="col-sm-10"><input type="text" id="seeddateconfig" name="seeddateconfig" class="form-control" style="width: 88%;" placeholder="请输入日期解析代码"></div>
                                     </div> -->
                                    <div class="form-group configtype" style="display:none"><label
                                            class="col-sm-2 control-label"><span
                                            style="color:red;font-size:16px;line-height:0px;">*</span>正文解析规则:</label>
                                        <div class="col-sm-10"><input type="text" id="seedtextconfig"
                                                                      name="seedtextconfig" class="form-control"
                                                                      style="width: 88%;" placeholder="请输入正文解析规则"></div>
                                    </div>
                                </div>
                            </fieldset>
                            <!-- <button class="btn btn-primary"style="margin-left: 20%;margin-top: 2%;" onclick="check()" type="submit">测试种子</button> -->
                            <button class="btn btn-primary" style="margin-left: 38%;margin-top: 2%;" id="addbutton"
                                    onclick="addwebsitetypename()" type="button">添加
                            </button>


                            <button class="btn btn-primary" style="margin-left: 38%;margin-top: 2%;" id="addbutton"
                                    onclick="testwebsitetypename()" type="button">测试
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <jsp:include page="footer.jsp" flush="true"/>
    </div>
</div>


<!-- Mainly scripts -->
<script src="${pageContext.request.contextPath }/js/jquery-2.1.1.js"></script>
<script src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath }/js/jquery.metisMenu.js"></script>
<script src="${pageContext.request.contextPath }/js/jquery.slimscroll.min.js"></script>
<script src="${pageContext.request.contextPath }/js/jquery.jeditable.js"></script>
<script src="${pageContext.request.contextPath }/js/datatables.min.js"></script>

<!-- Peity -->
<script src="${pageContext.request.contextPath }/js/jquery.peity.min.js"></script>

<!-- Custom and plugin javascript -->
<script src="${pageContext.request.contextPath }/js/inspinia.js"></script>
<script src="${pageContext.request.contextPath }/js/pace.min.js"></script>

<!-- Peity -->
<script src="${pageContext.request.contextPath }/js/peity-demo.js"></script>

<!-- toastr -->
<script src="${pageContext.request.contextPath }/js/plugins/toastr/toastr.min.js"></script>
<!-- Sweet alert -->
<script src="${pageContext.request.contextPath }/js/plugins/sweetalert/sweetalert.min.js"></script>


<script src="${pageContext.request.contextPath }/js/jquery.searchableSelect.js"></script>
<!-- Page-Level Scripts -->
<script>
    $(function () {
        $.ajax({
            type: "POST",
            url: "${pageContext.request.contextPath}/gettypename",
            data: {},
            dataType: 'json',
            success: function (data) {
                var htmlStr = "";
                var length = data.length;
                htmlStr += "<option value=''>请选择</option>";
                for (j = 0; j < length; j++) {
                    htmlStr += "<option value='" + data[j].id + "'>"
                        + data[j].typename + "</option>";
                }
                $('#se1').html(htmlStr);
            },
        });
    });


    $("#se1").on('change', function () {
        $.ajax({
            url: "${pageContext.request.contextPath}/news/getType",
            type: "post",
            data: {
                flag: $("#se1").val()
            },
            success: function (data) {
                data = JSON.parse(data);
                console.log(data)
                var htmlStr = "";
                var length = data.length;
                htmlStr += "<option value=''>请选择</option>";
                var seed_type_id = $('#se2').attr("data-id");
                for (j = 0; j < length; j++) {
                    if (!(!seed_type_id)) {
                        if (seed_type_id == data[j].seed_id) {
                            htmlStr += "<option value='" + data[j].seed_id + "'  selected = 'selected' >"
                                + data[j].seed_name + "</option>";
                        } else {
                            htmlStr += "<option value='" + data[j].seed_id + "'>"
                                + data[j].seed_name + "</option>";
                        }
                    } else {
                        htmlStr += "<option value='" + data[j].seed_id + "'>"
                            + data[j].seed_name + "</option>";
                    }
                }
                $("#se2").html("");
                $('#se2').html(htmlStr);
            },
            error: function (e) {

            }
        })
    });


    /***
     * 测试
     * */
    function testwebsitetypename() {
        let typeid = $("#se1 option:selected").val();
        $.ajax({
            url: "${pageContext.request.contextPath}/website/getTypeIndexInfo",
            type: "GET",
            data: {typeid: typeid},
//            contentType: "application/json",
            success: function (res) {
                let result = JSON.parse(res);
                let hbase_table = result.hbase_table;
                let index = result.esindex;
                let type = result.estype;
                if (hbase_table == undefined) {
                    $("#sampleDataDiv").attr("style", "display: block");
                    $("#sampleData").val(res);
                } else {
                    let data = new Object();
                    data.paramexample = $("#paramexample").val();
                    data.param = $("#param").val();
                    data.hbase_table = hbase_table;
                    data.index = index;
                    data.type = type;
                    $.ajax({
                        url: "${pageContext.request.contextPath}/website/testSeedInfo",
                        type: "post",
                        data: JSON.stringify(data),
                        contentType: "application/json",
                        success: function (res) {
//                            console.log(typeof (res));
//                            console.log(res);
                            $("#sampleDataDiv").attr("style", "display: block");
                            $("#sampleData").val(res);
                        },
                        error: function (e) {
                            console.error(e);
                        }
                    });
                }
            },
            error: function (e) {
                console.error(e);
            }
        });
    }

    function configTypeChange(num) {
        if (num == 1) {
            $("#smartbutton").attr("class", "btn btn-white active")
            $("#manualbutton").attr("class", "btn btn-white")
            $(".configtype").attr("style", "display: none;")
            $("#addbutton").attr("onclick", "addSmartSeed()")
            $("#spiderId").val(1)
        } else if (num == 2) {
            $("#smartbutton").attr("class", "btn btn-white")
            $("#manualbutton").attr("class", "btn btn-white active")
            $(".configtype").attr("style", "display:block;")
            $("#addbutton").attr("onclick", "addSeed()")
            $("#spiderId").val(2)
        }
    }

    function addwebsitetypename() {
        swal({
                title: "确定添加该此类型?",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                closeOnConfirm: false,
                closeOnCancel: true
            },
            function (isConfirm) {
                if (isConfirm) {
                    var data
                    data = {
                        websiteId: $("#websiteId").attr("data-id"),
                        typeid: $('#se1').val(),
                        paramexample: $('#paramexample').val(),
                        param: $('#param').val(),
                        errorparamexample: $('#errorparamexample').val(),
                        errorparam: $('#errorparam').val()
                    }
//                }
                    $.ajax({
                        url: "${pageContext.request.contextPath}/addtypename",
                        type: "post",
                        data: data,
                        success: function (res) {
                            console.log(typeof(res));
                            console.log(res);
                            if (res == '200') {
                                //toastr.success(res.msg);
                                swal("添加成功", "该站点类型已被添加", "success");
                                setTimeout(() => {
                                    window.location.href = "${pageContext.request.contextPath}/listtypename?websiteId=" +${websiteId};
                                }, 3000);
                            } else {
                                //toastr.error(res.msg);
                                swal("添加失败", "该站点类型已被添加", "error");
                            }
                        },
                        error: function (e) {
                            //toastr.error(res.msg);
                            swal("添加失败", "该种子已被添加", "error");
                            window.clearInterval(timer);
                        }
                    });
                }
            });


        /* text = $("input:checkbox[name='seedtextStorageJson']:checked").map(function(index,elem) {
            return $(elem).val();
        }).get().join(','); */

    }

    function addSeed() {
        if ($("#seedname").val() == null || $("#seedname").val() == "") {
            toastr.error('请填写需要采集的地址名')
            return;
        } else if ($("#seedurllist").val() == null || $("#seedurllist").val() == "") {
            toastr.error('请填写需要采集的地址列表')
            return;
        } else if ($("#seedtype").val() == null || $("#seedtype").val() == 0) {
            toastr.error('请填写需要配置的正文类型')
            return;
        } else if ($("#seedurlconfig").val() == null || $("#seedurlconfig").val() == "") {
            toastr.error('请填写需要配置的列表规则')
            return;
        } else if ($("#seedtitleconfig").val() == null || $("#seedtitleconfig").val() == "") {
            toastr.error('请填写需要配置的标题规则')
            return;
        } else if ($("#seeddateconfig").val() == null || $("#seeddateconfig").val() == "") {
            toastr.error('请填写需要配置的日期规则')
            return;
        } else if (!$("#checkbox1").prop('checked') && !$("#checkbox2").prop('checked') && !$("#checkbox3").prop('checked')) {
            toastr.error('请选择需要配置的存储规则')
            return;
        } else if ($("#seedtextconfig").val() == null || $("#seedtextconfig").val() == "") {
            toastr.error('请填写需要配置的正文规则')
            return;
        } else if ($("#se1").val() == null || $("#se1").val() == "") {
            toastr.error('请选择存储板块')
            return;
        } else if ($("#se2").val() == null || $("#se2").val() == "") {
            toastr.error('请选择文章的分类')
            return;
        }
        var sRegex = '(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]';
        var re = new RegExp(sRegex);
        if (!re.test($("#seedurllist").val())) {
            toastr.error('url填写不正确')
            return;
        }

        /* text = $("input:checkbox[name='seedtextStorageJson']:checked").map(function(index,elem) {
            return $(elem).val();
        }).get().join(','); */

//     	if(!$('#se1').val()){
//      	   var data = {
//      			  seedname : $("#seedname").val(),
//       			seedtype : $("#seedtype").val(),
//       			websiteId : $("#websiteId").attr("data-id"),
//       			seeddateconfig : $("#seeddateconfig").val(),
//       			seedintervalconfig : $("#seedintervalconfig").val(),
//       			seedsleepconfig : $("#seedsleepconfig").val(),
//       			seedurllist : $("#seedurllist").val(),
//       			seedstoragejson : $("input:checkbox[name='seedtextStorageJson']:checked").map(function(index,elem) {
//       	            return $(elem).val();
//       	        }).get().join(','),
//       			seedtextconfig : $("#seedtextconfig").val(),
//       			seedtextconfigtype : $("#seedtype").val(),
//       			seedthreadconfig : $("#seedthreadconfig").val(),
//       			seedtitleconfig : $("#seedtitleconfig").val(),
//       			seedurlconfig : $("#seedurlconfig").val(),
//       			seeddateconfig : $("#seeddateconfig").val(),
//       			seedlinkurlconfig : $("#seedlinkurlconfig").val(),
//       			seedoriginconfig : $("#seedoriginconfig").val(),
//       			seedoriginurlconfig : $("#seedoriginurlconfig").val(),
//       			dailiflag : $("input[name='killOrder1']:checked").val(),
//     			seleniumflag : $("input[name='killOrder2']:checked").val(),
//       			seedarticletype : $("#se2").val(),
//       			seedspidertype : 2
//      		}
//         }else{
        data = {
            seedname: $("#seedname").val(),
            seedtype: $("#seedtype").val(),
            websiteId: $("#websiteId").attr("data-id"),
            seeddateconfig: $("#seeddateconfig").val(),
            seedintervalconfig: $("#seedintervalconfig").val(),
            seedsleepconfig: $("#seedsleepconfig").val(),
            seedurllist: $("#seedurllist").val(),
            seedstoragejson: $("input:checkbox[name='seedtextStorageJson']:checked").map(function (index, elem) {
                return $(elem).val();
            }).get().join(','),
            seedtextconfig: $("#seedtextconfig").val(),
            seedtextconfigtype: $("#seedtype").val(),
            seedthreadconfig: $("#seedthreadconfig").val(),
            seedtitleconfig: $("#seedtitleconfig").val(),
            seedurlconfig: $("#seedurlconfig").val(),
            seeddateconfig: $("#seeddateconfig").val(),
            seedlinkurlconfig: $("#seedlinkurlconfig").val(),
            seedoriginconfig: $("#seedoriginconfig").val(),
            seedoriginurlconfig: $("#seedoriginurlconfig").val(),
            dailiflag: $("input[name='killOrder1']:checked").val(),
            seleniumflag: $("input[name='killOrder2']:checked").val(),
            seedarticletype: $("#se2").val(),
            seedspidertype: 2,
            otherseedid: $('#se1').val(),
            otherwebsiteId: 15
        }
//         }
        $.ajax({
            url: "${pageContext.request.contextPath}/insertseed",
            type: "post",
            data: data,
            success: function (res) {
                console.log(res)
                if (res.status == 200) {
                    toastr.success(res.msg);
                    setTimeout(() => {
                        window.location.href = "${pageContext.request.contextPath}/listseed?websiteId=" +${websiteId};
                    }, 3000);
                } else {
                    toastr.error(res.msg);
                }
            },
            error: function (e) {
                toastr.error(res.msg);
                window.clearInterval(timer);
            }
        });
    }

    function check() {

        if ($("#seedname").val() == null || $("#seedname").val() == "") {
            toastr.error('请填写需要采集的地址名')
            return;
        } else if ($("#seedurllist").val() == null || $("#seedurllist").val() == "") {
            toastr.error('请填写需要采集的地址列表')
            return;
        } else if ($("#seedtype").val() == null || $("#seedtype").val() == 0) {
            toastr.error('请填写需要配置的正文类型')
            return;
        } else if ($("#seedurlconfig").val() == null || $("#seedurlconfig").val() == "") {
            toastr.error('请填写需要配置的列表规则')
            return;
        } else if ($("#seedtitleconfig").val() == null || $("#seedtitleconfig").val() == "") {
            toastr.error('请填写需要配置的标题规则')
            return;
        } else if ($("#seeddateconfig").val() == null || $("#seeddateconfig").val() == "") {
            toastr.error('请填写需要配置的日期规则')
            return;
        } else if (!$("#checkbox1").prop('checked') && !$("#checkbox2").prop('checked') && !$("#checkbox3").prop('checked')) {
            toastr.error('请选择需要配置的存储规则')
            return;
        } else if ($("#seedtextconfig").val() == null || $("#seedtextconfig").val() == "") {
            toastr.error('请填写需要配置的正文规则')
            return;
        } else if ($("#se2").val() == null || $("#se2").val() == "") {
            toastr.error('请选择文章的分类')
            return;
        }
        var sRegex = '^((https|http|ftp|rtsp|mms)?://)' + '?(([0-9a-z_!~*\'().&=+$%-]+: )?[0-9a-z_!~*\'().&=+$%-]+@)?'
            + '(([0-9]{1,3}.){3}[0-9]{1,3}'
            + '|'
            + '([0-9a-z_!~*\'()-]+.)*'
            + '([0-9a-z][0-9a-z-]{0,61})?[0-9a-z].'
            + '[a-z]{2,6})'
            + '(:[0-9]{1,4})?'
            + '((/?)|'
            + '(/[0-9a-z_!~*\'().;?:@&=+$,%#-]+)+/?)$';
        var re = new RegExp(sRegex);
        if (!re.test($("#seedurllist").val())) {
            toastr.error('url填写不正确')
            return;
        }


        /* var seedtype = $("#seedtype").val();
        var seedtextconfig = $("#seedtextconfig").val();
        var seedthreadconfig = $("#seedthreadconfig").val();
        var seedtitleconfig = $("#seedtitleconfig").val();
        var seedurlconfig = $("#seedurlconfig").val();
        var seedurllist = $("#seedurllist").val();
        var seeddateconfig = $("#seeddateconfig").val();
        var seedlinkurlconfig = $("#seedlinkurlconfig").val();
        var seedoriginconfig = $("#seedoriginconfig").val();
        var seedoriginurlconfig = $("#seedoriginurlconfig").val();
        var seedsleepconfig = $("#seedsleepconfig").val(); */


        /* window.open("







        ${pageContext.request.contextPath}/spiderconfig/test?seedtype="+$("#seedtype").val()+"&seeddateconfig="
    			+$("#seeddateconfig").val()+"&seedintervalconfig="+$("#seedintervalconfig").val()
    			+"&seedsleepconfig="+$("#seedsleepconfig").val()
    			+"&seedurllist="+$("#seedurllist").val()+"&seedtextconfig="+$("#seedtextconfig").val()+
    			"&seedthreadconfig="+$("#seedthreadconfig").val()+"&seedtitleconfig="+$("#seedtitleconfig").val()
    			+"&seedurlconfig="+$("#seedurlconfig").val()+"&seedlinkurlconfig="+$("#seedlinkurlconfig").val()
    			+"&seedoriginconfig="+$("#seedoriginconfig").val()); */
    }


    //跑马灯方法
    // 	 function init(){
    // 		    //获取标题
    // 		    var title=document.title;
    // 		    //分割字符串--->字符数组
    // 		    var arr=title.split("");
    // 		    //删除第一个元素并返回该元素
    // 		    var e=arr.shift();
    // 		    //把一个对象添加到数组末尾
    // 		    arr.push(e);
    // 		    //把数组转换成字符串
    // 		    var marquee=arr.join("");
    // 		    //返回给浏览器
    // 		    document.title=marquee;
    // 		    //定时一直执行
    // 		    window.setTimeout("init()",1000);
    // 		}
    // 		window.onload=init;

</script>

</body>

</html>
